package com.example.restful.utils;


import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;

public class UrlUtil {
    public static String getUrl(Class<?> clazz,String method) {
        return linkTo(clazz,method).toUri().toString();
    }
    public static String getUrlWithArg(Class<?> clazz,String method,int id){
        return linkTo(clazz,method).slash(id).toUri().toString();
    }
}
